<?php
echo $this->load->view ( 'header' );
?>
<!--头部开始-->
<div>
	<ul class="breadcrumb">
		<li><a href="<?php echo site_url('power'); ?>"><?php echo lang('power_list'); ?></a><span
			class="divider">/</span></li>
		<li><a
			href="<?php echo site_url($this -> config -> item('admin_folder').'power/form');?>"><?php echo $title; ?></a></li>
	</ul>
</div>
<!--头部结束-->
<?php

if ($this->session->flashdata ( 'message' )) {
	$message = $this->session->flashdata ( 'message' );
}

if ($this->session->flashdata ( 'error' )) {
	$error = $this->session->flashdata ( 'error' );
}

if (function_exists ( 'validation_errors' ) && validation_errors () != '') {
	$error = validation_errors ();
}
?>
		
		<?php if (!empty($message)): ?>
<div class="alert alert-info">
	<a class="close" data-dismiss="alert">×</a>
			<?php echo $message; ?>
		</div>
<?php endif; ?>
						<?php if (!empty($error)): ?>
<div class="alert alert-error">
	<a class="close" data-dismiss="alert">×</a>
			<?php echo $error; ?>
		</div>
<?php endif; ?>

<!--权限开始-->
<div class="row-fluid sortable">
	<div class="box span12">
		<div class="box-header well">
			<h2>
				<i class="icon-edit"></i> <?php echo $title; ?></h2>
			<div class="box-icon">
				<a href="#" class="btn btn-minimize btn-round"><i
					class="icon-chevron-up"></i></a> <a href="#"
					class="btn btn-close btn-round"><i class="icon-remove"></i></a>
			</div>
		</div>
		<div class="box-content">
							<?php
							
							$attributes = array (
									'class' => 'form-horizontal',
									'id' => 'power_form' 
							);
							echo form_open ( $this->config->item ( 'admin_folder' ) . 'power/form/' . $id, $attributes );
							?>
						  <fieldset>
				<legend><?php echo lang('hint'); ?></legend>
				<?php
				/*
				 * 无限下拉菜单 <div class="control-group"> <label class="control-label" for="pid"><?php echo lang('power_pid'); ?></label> <div class="controls"> <?php /* $data = array ( 'id' => 'pid', 'name' => 'pid', 'value' => set_value ( 'pid', $pid ) ); echo form_input ( $data ); ?> <span id="sel_list_show"></span> <span class="help-inline"><?php echo lang('power_pid_span'); ?></span> </div> </div>
				 */
				?>
			<div class="control-group">
					<label class="control-label" for="pid"><?php echo lang('power_pid'); ?></label>
                <div class="controls">
						<select name="pid">
							<option value=""><?php echo lang('power_select_none');?></option>
 				<?php foreach ( $pname as $v ) :?>
							<option value='<?php echo $v->id;?>'
								<?php if($v->id==$pid){echo 'selected';}?>><?php echo $v->name;?></option>
 				<?php endforeach; ?>
				</select> <span class="help-inline"><?php echo lang('power_pid_span'); ?></span>
					</div>
				</div>

				<div class="control-group">
					<label class="control-label" for="name"><?php echo lang('power_name'); ?></label>
					<div class="controls">
							  	<?php
										$data = array (
												'id' => 'name',
												'name' => 'name',
												'value' => set_value ( 'name', $name ) 
										);
										echo form_input ( $data );
										?>
								<span class="help-inline"><i class="icon-star"
							title="<?php echo lang('data_required'); ?>"></i><?php echo lang('power_name_span'); ?></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="url"><?php echo lang('power_url'); ?></label>
					<div class="controls">
							  	<?php
										$data = array (
												'id' => 'url',
												'name' => 'url',
												'value' => set_value ( 'url', $url ) 
										);
										echo form_input ( $data );
										?>
								<span class="help-inline"><?php echo lang('power_url_span'); ?></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="icon"><?php echo lang('power_icon'); ?></label>
					<div class="controls">
							  	<?php
										$data = array (
												'id' => 'icon',
												'name' => 'icon',
												'value' => set_value ( 'icon', $icon ) 
										);
										echo form_input ( $data );
										?>
								<span class="help-inline"><?php echo lang('power_icon_span'); ?></span>
					</div>
				</div>
				<?php  if($status):?>
					
							<div class="control-group">
					<label class="control-label"><?php echo lang('power_status'); ?></label>
					<div class="controls">
						<label class="radio"> <input type="radio" id="status"
							<?php
					if ($status == 1) {
						echo 'checked';
					}
					?>
							name="status" value="1" /> <?php echo lang('power_status_open'); ?>
						</label>
						<div style="clear: both"></div>
						<label class="radio"> <input type="radio" id="status"
							<?php
					if ($status != 1) {
						echo 'checked';
					}
					?>
							name="status" value="2" /> <?php echo lang('power_status_close'); ?>
						</label>
					</div>
				</div>
				<?php endif;?>
				<div class="control-group">
					<label class="control-label" for="rank"><?php echo lang('power_rank'); ?></label>
					<div class="controls">
							  	<?php
										$data = array (
												'id' => 'rank',
												'name' => 'rank',
												'value' => set_value ( 'rank', $rank ) 
										);
										echo form_input ( $data );
										?>
								<span class="help-inline"><?php echo lang('power_rank_span'); ?></span>
					</div>
				</div>


				<div class="form-actions">
					<button type="submit" class="btn btn-primary"><?php echo lang('button_save'); ?></button>
				</div>
			</fieldset>
			</form>
		</div>
	</div>
	<!--/box span12-->
</div>
<!--/row-->
<!--权限结束-->
<div class="row-fluid sortable">
	<div class="box span12">
		<div class="box-header well" data-original-title>
			<h2>
				<i class="icon-picture"></i> <?php echo lang('icon_title');?></h2>
			<div class="box-icon">
				<a href="#" class="btn btn-minimize btn-round"><i
					class="icon-chevron-up"></i></a> <a href="#"
					class="btn btn-close btn-round"><i class="icon-remove"></i></a>
			</div>
		</div>
		<div class="box-content">
			<section id="icons1">
				<div class="page-header">
					<h1>
						<small><?php echo lang('change_icon_title');?></small>
					</h1>
				</div>
				<div class="row-fluid bs-icons">
					<div class="span3">
						<ul class="the-icons">
							<li><i class="icon-glass"></i> icon-glass</li>
							<li><i class="icon-music"></i> icon-music</li>
							<li><i class="icon-search"></i> icon-search</li>
							<li><i class="icon-envelope"></i> icon-envelope</li>
							<li><i class="icon-heart"></i> icon-heart</li>
							<li><i class="icon-star"></i> icon-star</li>
							<li><i class="icon-star-empty"></i> icon-star-empty</li>
							<li><i class="icon-user"></i> icon-user</li>
							<li><i class="icon-film"></i> icon-film</li>
							<li><i class="icon-th-large"></i> icon-th-large</li>
							<li><i class="icon-th"></i> icon-th</li>
							<li><i class="icon-th-list"></i> icon-th-list</li>
							<li><i class="icon-ok"></i> icon-ok</li>
							<li><i class="icon-remove"></i> icon-remove</li>
							<li><i class="icon-zoom-in"></i> icon-zoom-in</li>
							<li><i class="icon-zoom-out"></i> icon-zoom-out</li>
							<li><i class="icon-off"></i> icon-off</li>
							<li><i class="icon-signal"></i> icon-signal</li>
							<li><i class="icon-cog"></i> icon-cog</li>
							<li><i class="icon-trash"></i> icon-trash</li>
							<li><i class="icon-home"></i> icon-home</li>
							<li><i class="icon-file"></i> icon-file</li>
							<li><i class="icon-time"></i> icon-time</li>
							<li><i class="icon-road"></i> icon-road</li>
							<li><i class="icon-download-alt"></i> icon-download-alt</li>
							<li><i class="icon-download"></i> icon-download</li>
							<li><i class="icon-upload"></i> icon-upload</li>
							<li><i class="icon-inbox"></i> icon-inbox</li>
							<li><i class="icon-play-circle"></i> icon-play-circle</li>
							<li><i class="icon-repeat"></i> icon-repeat</li>
							<li><i class="icon-refresh"></i> icon-refresh</li>
							<li><i class="icon-list-alt"></i> icon-list-alt</li>
							<li><i class="icon-lock"></i> icon-lock</li>
							<li><i class="icon-flag"></i> icon-flag</li>
							<li><i class="icon-headphones"></i> icon-headphones</li>
						</ul>
					</div>
					<div class="span3">
						<ul class="the-icons">
							<li><i class="icon-volume-off"></i> icon-volume-off</li>
							<li><i class="icon-volume-down"></i> icon-volume-down</li>
							<li><i class="icon-volume-up"></i> icon-volume-up</li>
							<li><i class="icon-qrcode"></i> icon-qrcode</li>
							<li><i class="icon-barcode"></i> icon-barcode</li>
							<li><i class="icon-tag"></i> icon-tag</li>
							<li><i class="icon-tags"></i> icon-tags</li>
							<li><i class="icon-book"></i> icon-book</li>
							<li><i class="icon-bookmark"></i> icon-bookmark</li>
							<li><i class="icon-print"></i> icon-print</li>
							<li><i class="icon-camera"></i> icon-camera</li>
							<li><i class="icon-font"></i> icon-font</li>
							<li><i class="icon-bold"></i> icon-bold</li>
							<li><i class="icon-italic"></i> icon-italic</li>
							<li><i class="icon-text-height"></i> icon-text-height</li>
							<li><i class="icon-text-width"></i> icon-text-width</li>
							<li><i class="icon-align-left"></i> icon-align-left</li>
							<li><i class="icon-align-center"></i> icon-align-center</li>
							<li><i class="icon-align-right"></i> icon-align-right</li>
							<li><i class="icon-align-justify"></i> icon-align-justify</li>
							<li><i class="icon-list"></i> icon-list</li>
							<li><i class="icon-indent-left"></i> icon-indent-left</li>
							<li><i class="icon-indent-right"></i> icon-indent-right</li>
							<li><i class="icon-facetime-video"></i> icon-facetime-video</li>
							<li><i class="icon-picture"></i> icon-picture</li>
							<li><i class="icon-pencil"></i> icon-pencil</li>
							<li><i class="icon-map-marker"></i> icon-map-marker</li>
							<li><i class="icon-adjust"></i> icon-adjust</li>
							<li><i class="icon-tint"></i> icon-tint</li>
							<li><i class="icon-edit"></i> icon-edit</li>
							<li><i class="icon-share"></i> icon-share</li>
							<li><i class="icon-check"></i> icon-check</li>
							<li><i class="icon-move"></i> icon-move</li>
							<li><i class="icon-step-backward"></i> icon-step-backward</li>
							<li><i class="icon-fast-backward"></i> icon-fast-backward</li>
						</ul>
					</div>
					<div class="span3">
						<ul class="the-icons">
							<li><i class="icon-backward"></i> icon-backward</li>
							<li><i class="icon-play"></i> icon-play</li>
							<li><i class="icon-pause"></i> icon-pause</li>
							<li><i class="icon-stop"></i> icon-stop</li>
							<li><i class="icon-forward"></i> icon-forward</li>
							<li><i class="icon-fast-forward"></i> icon-fast-forward</li>
							<li><i class="icon-step-forward"></i> icon-step-forward</li>
							<li><i class="icon-eject"></i> icon-eject</li>
							<li><i class="icon-chevron-left"></i> icon-chevron-left</li>
							<li><i class="icon-chevron-right"></i> icon-chevron-right</li>
							<li><i class="icon-plus-sign"></i> icon-plus-sign</li>
							<li><i class="icon-minus-sign"></i> icon-minus-sign</li>
							<li><i class="icon-remove-sign"></i> icon-remove-sign</li>
							<li><i class="icon-ok-sign"></i> icon-ok-sign</li>
							<li><i class="icon-question-sign"></i> icon-question-sign</li>
							<li><i class="icon-info-sign"></i> icon-info-sign</li>
							<li><i class="icon-screenshot"></i> icon-screenshot</li>
							<li><i class="icon-remove-circle"></i> icon-remove-circle</li>
							<li><i class="icon-ok-circle"></i> icon-ok-circle</li>
							<li><i class="icon-ban-circle"></i> icon-ban-circle</li>
							<li><i class="icon-arrow-left"></i> icon-arrow-left</li>
							<li><i class="icon-arrow-right"></i> icon-arrow-right</li>
							<li><i class="icon-arrow-up"></i> icon-arrow-up</li>
							<li><i class="icon-arrow-down"></i> icon-arrow-down</li>
							<li><i class="icon-share-alt"></i> icon-share-alt</li>
							<li><i class="icon-resize-full"></i> icon-resize-full</li>
							<li><i class="icon-resize-small"></i> icon-resize-small</li>
							<li><i class="icon-plus"></i> icon-plus</li>
							<li><i class="icon-minus"></i> icon-minus</li>
							<li><i class="icon-asterisk"></i> icon-asterisk</li>
							<li><i class="icon-exclamation-sign"></i> icon-exclamation-sign</li>
							<li><i class="icon-gift"></i> icon-gift</li>
							<li><i class="icon-leaf"></i> icon-leaf</li>
							<li><i class="icon-fire"></i> icon-fire</li>
							<li><i class="icon-eye-open"></i> icon-eye-open</li>
						</ul>
					</div>
					<div class="span3">
						<ul class="the-icons">
							<li><i class="icon-eye-close"></i> icon-eye-close</li>
							<li><i class="icon-warning-sign"></i> icon-warning-sign</li>
							<li><i class="icon-plane"></i> icon-plane</li>
							<li><i class="icon-calendar"></i> icon-calendar</li>
							<li><i class="icon-random"></i> icon-random</li>
							<li><i class="icon-comment"></i> icon-comment</li>
							<li><i class="icon-magnet"></i> icon-magnet</li>
							<li><i class="icon-chevron-up"></i> icon-chevron-up</li>
							<li><i class="icon-chevron-down"></i> icon-chevron-down</li>
							<li><i class="icon-retweet"></i> icon-retweet</li>
							<li><i class="icon-shopping-cart"></i> icon-shopping-cart</li>
							<li><i class="icon-folder-close"></i> icon-folder-close</li>
							<li><i class="icon-folder-open"></i> icon-folder-open</li>
							<li><i class="icon-resize-vertical"></i> icon-resize-vertical</li>
							<li><i class="icon-resize-horizontal"></i> icon-resize-horizontal</li>
							<li><i class="icon-hdd"></i> icon-hdd</li>
							<li><i class="icon-bullhorn"></i> icon-bullhorn</li>
							<li><i class="icon-bell"></i> icon-bell</li>
							<li><i class="icon-certificate"></i> icon-certificate</li>
							<li><i class="icon-thumbs-up"></i> icon-thumbs-up</li>
							<li><i class="icon-thumbs-down"></i> icon-thumbs-down</li>
							<li><i class="icon-hand-right"></i> icon-hand-right</li>
							<li><i class="icon-hand-left"></i> icon-hand-left</li>
							<li><i class="icon-hand-up"></i> icon-hand-up</li>
							<li><i class="icon-hand-down"></i> icon-hand-down</li>
							<li><i class="icon-circle-arrow-right"></i>
								icon-circle-arrow-right</li>
							<li><i class="icon-circle-arrow-left"></i> icon-circle-arrow-left</li>
							<li><i class="icon-circle-arrow-up"></i> icon-circle-arrow-up</li>
							<li><i class="icon-circle-arrow-down"></i> icon-circle-arrow-down</li>
							<li><i class="icon-globe"></i> icon-globe</li>
							<li><i class="icon-wrench"></i> icon-wrench</li>
							<li><i class="icon-tasks"></i> icon-tasks</li>
							<li><i class="icon-filter"></i> icon-filter</li>
							<li><i class="icon-briefcase"></i> icon-briefcase</li>
							<li><i class="icon-fullscreen"></i> icon-fullscreen</li>
						</ul>
					</div>
				</div>
		
		</div>
	</div>
	<!--/box span12-->
</div>
<!--/row-->
<?php
echo $this->load->view ( 'footer' );
?>
<?php
/*
 * 无限下拉菜单 <script type="text/javascript" src="<?php echo SITE_ADMIN_JS; ?>/lib_ajax_cate.js"></script> <?php if ($id || $pid) : ?> <script type="text/javascript"> stepless_classification('sel_list_show', 'pid[]', '<?php echo site_url($this -> config -> item('admin_folder').'power/get_cate') ; ?>/', <?php echo $pid; ?>, '/<?php echo $id; ?>'); </script> <?php else:?> <script type="text/javascript"> stepless_classification('sel_list_show', 'pid[]', '<?php echo site_url($this -> config -> item('admin_folder').'power/get_cate') ; ?>/', 0); </script> <?php endif;?>
 */
?>
</body>
</html>